package pages;

import java.util.List;

import org.openqa.selenium.WebElement;

import io.appium.java_client.AppiumBy;
import io.appium.java_client.android.AndroidDriver;
import utils.BaseAction;

public class YinshiPage{

	AndroidDriver  driver;
	BaseAction action;

	public YinshiPage(AndroidDriver  driver) {
		this.driver = driver;
		action= new BaseAction(driver);
	}	
	
	
	public WebElement yinshi1() {
		WebElement yinshi1 = (WebElement) driver.findElement(AppiumBy
				.id("njust.dzh.fitnesssystem:id/foodie_event"));
		return yinshi1;	
	}
	public WebElement list_item1() {
		WebElement list_view=driver.findElement(AppiumBy
				.id("njust.dzh.fitnesssystem:id/left_listview"));
		List<WebElement> items= list_view.findElements(AppiumBy
				.id("njust.dzh.fitnesssystem:id/left_list_item"));
		return items.get(1);
	}
	public WebElement list_item4() {
		WebElement list_view=driver.findElement(AppiumBy
				.id("njust.dzh.fitnesssystem:id/left_listview"));
		List<WebElement> items= list_view.findElements(AppiumBy
				.id("njust.dzh.fitnesssystem:id/left_list_item"));
		return items.get(4);
	}
	
	
	
		

	public void gdb() throws InterruptedException {
		
		action.click(this.list_item1());
		
			
	}

	public void gxw() throws InterruptedException {

		action.click(this.list_item4());
				
		}
}
	
		

